<html xmlns='http://www.w3.org/1999/xhtml'
      xmlns:p='http://primefaces.org/ui'
      xmlns:h='http://java.sun.com/jsf/html'
      xmlns:cc='http://java.sun.com/jsf/composite'>

<cc:interface>

<cc:attribute name='id'/>

<cc:attribute name='b'/>

<cc:attribute name='t'/>

<cc:attribute name='v'/>

<cc:attribute name='wT' default='65'/>

<cc:attribute name='w'  default='250px'/>

<cc:attribute name='cp'/>

<cc:attribute name='cv'/>

<cc:attribute name='s'  method-signature='void listener()'/>

<cc:attribute name='var' default='x'/>

<cc:attribute name='xL'/>

<cc:attribute name='x'/>

<cc:attribute name='style'/>

<cc:attribute name='read' default='#{cc.attrs.b.isRead}'/>

<cc:attribute name='u' default='@(.#{cc.attrs.b.name})'/>

<cc:attribute name='p' default='@(.#{cc.attrs.b.name})'/>

<cc:attribute name='onkeydown'/>

<cc:attribute name='tp'/>

</cc:interface>


<cc:implementation>

<h:panelGrid columns='2' cellpadding='0' cellspacing='0' styleClass='align-text-bottom'>

  <h:panelGrid columns='1' cellpadding='0' cellspacing='1' width='#{cc.attrs.wT}' styleClass='ui-state-default xFd'><span  title='#{cc.attrs.tp}'>#{cc.attrs.t}</span></h:panelGrid>

  <p:autoComplete id="#{cc.attrs.cp != null  and cc.attrs.cv != null? 'complete' : 'complete1'}" value='#{cc.attrs.v}' completeMethod="#{cc.attrs.b[cc.attrs.cp]}" converter="#{cc.attrs.b[cc.attrs.cv]}" onkeydown='#{cc.attrs.onkeydown}'

                  var='#{cc.attrs.var}' itemLabel='#{cc.attrs.xL}' itemValue='#{cc.attrs.x}' scrollHeight='200'

                  styleClass='xAuto' rendered='#{!cc.attrs.read and cc.attrs.cp != null  and cc.attrs.cv != null}' style='width: #{cc.attrs.w};#{cc.attrs.style}'>

  <p:ajax event='itemSelect' listener='#{cc.attrs.s}' update='#{cc.attrs.u}' process='#{cc.attrs.p}' disabled='#{cc.attrs.s == null}' partialSubmit='true'/>

  </p:autoComplete>

  <p:autoComplete id="#{cc.attrs.cp == null and cc.attrs.cv == null? 'complete' : 'complete1'}"  value='#{cc.attrs.v}' completeMethod="#{cc.attrs.b['complete']}" converter="#{cc.attrs.b['converter']}" onkeydown='#{cc.attrs.onkeydown}'

                    var='#{cc.attrs.var}' itemLabel='#{cc.attrs.xL}' itemValue='#{cc.attrs.x}' scrollHeight='200'

                    styleClass='xAuto' rendered='#{!cc.attrs.read and cc.attrs.cp == null  and cc.attrs.cv == null}' style='width: #{cc.attrs.w};#{cc.attrs.style}'>

  <p:ajax event='itemSelect' listener='#{cc.attrs.s}' update='#{cc.attrs.u}' process='#{cc.attrs.p}' disabled='#{cc.attrs.s == null}' partialSubmit='true'/>

  </p:autoComplete>


  <h:outputText value='#{cc.attrs.nombre}' rendered='#{cc.attrs.read}' styleClass='xIn'/>

</h:panelGrid>

</cc:implementation>

</html>